package com.zhengshang.api.service.impl;

import java.util.List;
import com.zhengshang.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhengshang.api.mapper.AppOtherQueryRecordMapper;
import com.zhengshang.api.domain.AppOtherQueryRecord;
import com.zhengshang.api.service.IAppOtherQueryRecordService;

/**
 * 违章查询记录Service业务层处理
 * 
 * @author zhengshang
 * @date 2021-04-08
 */
@Service
public class AppOtherQueryRecordServiceImpl implements IAppOtherQueryRecordService
{
    @Autowired
    private AppOtherQueryRecordMapper appOtherQueryRecordMapper;

    /**
     * 查询违章查询记录
     * 
     * @param recordId 违章查询记录ID
     * @return 违章查询记录
     */
    @Override
    public AppOtherQueryRecord selectAppOtherQueryRecordById(Long recordId)
    {
        return appOtherQueryRecordMapper.selectAppOtherQueryRecordById(recordId);
    }

    /**
     * 查询违章查询记录列表
     * 
     * @param appOtherQueryRecord 违章查询记录
     * @return 违章查询记录
     */
    @Override
    public List<AppOtherQueryRecord> selectAppOtherQueryRecordList(AppOtherQueryRecord appOtherQueryRecord)
    {
        return appOtherQueryRecordMapper.selectAppOtherQueryRecordList(appOtherQueryRecord);
    }

    @Override
    public int getTodayCount(AppOtherQueryRecord appOtherQueryRecord) {
        return appOtherQueryRecordMapper.getTodayCount(appOtherQueryRecord);
    }

    /**
     * 新增违章查询记录
     * 
     * @param appOtherQueryRecord 违章查询记录
     * @return 结果
     */
    @Override
    public int insertAppOtherQueryRecord(AppOtherQueryRecord appOtherQueryRecord)
    {
        appOtherQueryRecord.setCreateTime(DateUtils.getNowDate());
        return appOtherQueryRecordMapper.insertAppOtherQueryRecord(appOtherQueryRecord);
    }

    /**
     * 修改违章查询记录
     * 
     * @param appOtherQueryRecord 违章查询记录
     * @return 结果
     */
    @Override
    public int updateAppOtherQueryRecord(AppOtherQueryRecord appOtherQueryRecord)
    {
        appOtherQueryRecord.setUpdateTime(DateUtils.getNowDate());
        return appOtherQueryRecordMapper.updateAppOtherQueryRecord(appOtherQueryRecord);
    }

    /**
     * 批量删除违章查询记录
     * 
     * @param recordIds 需要删除的违章查询记录ID
     * @return 结果
     */
    @Override
    public int deleteAppOtherQueryRecordByIds(Long[] recordIds)
    {
        return appOtherQueryRecordMapper.deleteAppOtherQueryRecordByIds(recordIds);
    }

    /**
     * 删除违章查询记录信息
     * 
     * @param recordId 违章查询记录ID
     * @return 结果
     */
    @Override
    public int deleteAppOtherQueryRecordById(Long recordId)
    {
        return appOtherQueryRecordMapper.deleteAppOtherQueryRecordById(recordId);
    }
}
